package com.zhentao.controller;

import com.zhentao.model.common.admin.dto.AdminLoginDto;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.service.AdminUserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/login")
public class AdminLoginController {
    @Resource
    private AdminUserService adminUserService;

    /**
     * 平台管理端登录
     */
    @PostMapping("/in")
    @ApiOperation("平台管理端登录")
    public ResponseResult addLogin(@RequestBody AdminLoginDto loginDto){
        return adminUserService.addLogin(loginDto);
    }
}
